//
//  LzwSingleton.h
//  NewHalfsugar
//
//  Created by 刘志武 on 16/1/8.
//  Copyright © 2016年 刘志武. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "LzwNewHeadModle.h"
#import "LzwNewBetweenModle.h"
#import "LzwModleNewTwo.h"
#import "LzwModleSmall.h"
#import "LzwAdressModle.h"
#import "LzwBellModle.h"

@interface LzwSingleton : NSObject

+(instancetype)shareDataBase;
//打开数据库
- (void)openDB;
//创建首页数据库表(缓存的)
- (void)createTable;
//创建首页第二表
- (void)createNewBetweenTable;
//创建首页第三表
- (void)createNewFootTable;
//插入首页轮播图对象
- (void)insertLzwNewHeadIntoTable:(LzwNewHeadModle *)newHead;
//插入首页中间的滚动对象
- (void)insertLzwNewBetweenIntoTable:(LzwNewBetweenModle *)newBetween;
//插入首页下面普通cell对象
- (void)insertLzwModleNewTwoIntoTable:(LzwModleNewTwo *)newFoot;
//创建首页断网缓存时查询的表
//查询首页第一张表
- (NSMutableArray *)selectNewHeaderTable;
//查询首页第二张表
- (NSMutableArray *)selectNewBetweenTable;
//查询首页第三张表
- (NSMutableArray *)selectNewFooterTable;
//删除首页第一张表
- (void)deleteFirstTable:(NSString *)photo;
- (void)deleteTwoTable:(NSString *)photo;
- (void)deleteThreeTable:(NSString *)title;

//创建第二页(缓存表)
//头部缓存表
- (void)createNewAdressHeadTable;
//头部以下缓存表
- (void)createNewAdressFootTable;
//插入头部对象
- (void)insertLzwAdressHeadIntoTable:(LzwAdressModle *)modleA;
//插入头部以下对象
- (void)insertLzwNewAdressFootIntoTable:(LzwModleSmall *)modleB;
//创建头部查询表
- (NSMutableArray *)selectNewAdressHeadTable;
//创建头部以下查询表
- (NSMutableArray *)selectNewAdressFootTable;

//创建关注表
- (void)createAttentionTable;
//创建关注插入对象的表
- (void)insertAttentionIntoTable:(LzwModleSmall *)modleS;
//创建关注查询表
- (NSMutableArray *)selectAttentionTable;
//创建删除关注活动的表
-(void)deleteAttentionTable:(NSString *)content;

//创建第三页数据库表(收藏得)
- (void)creatBellTable;
- (void)insertLzwBellTable:(LzwBellModle *)modleBell;
- (NSMutableArray *)selectBellTable;
- (void)deleteBellCollect:(NSString *)title;

@end
